<!DOCTYPE html> 
<html> 
	<head> 
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1"> 
		<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
		<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
		<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
		<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
    	
		<script>
			document.addEventListener("deviceready", onDeviceReady, false);
    		function onDeviceReady() {
        		checkConnection();
    		}
    
     		function showAlert() {
        		navigator.notification.alert(
            			'Da biste koristili aplikaciju morate se spojiti na internet!',  
             			alertDismissed,         
            			'Upozorenje',           
            			'U redu'                 
        		);
    		}
    
    		function alertDismissed() {
    			navigator.app.exitApp();
    		}

    		function checkConnection() {
        		var networkState = navigator.network.connection.type;
        		if (networkState==Connection.NONE) {
        			showAlert();
        	
        		}
    		}

	</script>
	</head>
 
	<body> 
		<div data-role="page">
			<div data-role="header">
			<h1>Odaberite opciju:</h1>
		</div>

		<div data-role="content">		
			<div data-role="controlgroup">
				<a href="mapa.html" rel="external" data-role="button">Planiranje putovanja</a>
				<a href="mjesta.html" rel="external" data-role="button">Mjesta</a>
				<a href="pomoc.html" rel="external" data-role="button">Pomoć</a>
				<a href="oAplikaciji.html" rel="external" data-role="button">O aplikaciji</a>
			</div>

		</div>

		<div data-role="footer">
			<h4>Putovanje 1.0</h4>
		</div>
		</div>

	</body>
</html>
